namespace ExcelTemplateEngine.OpenXML
{
    /// <summary>
    /// 共享字符串表接口
    /// </summary>
    public interface ISharedStringTable
    {
        /// <summary>
        /// 共享字符串数量
        /// </summary>
        int Count { get; }
        
        /// <summary>
        /// 添加字符串到共享字符串表
        /// </summary>
        /// <param name="text">要添加的字符串</param>
        /// <returns>字符串在表中的索引</returns>
        int AddString(string text);
        
        /// <summary>
        /// 根据索引获取字符串
        /// </summary>
        /// <param name="index">字符串索引</param>
        /// <returns>字符串内容</returns>
        string GetString(int index);
        
        /// <summary>
        /// 检查是否包含指定字符串
        /// </summary>
        /// <param name="text">要检查的字符串</param>
        /// <returns>是否包含</returns>
        bool ContainsString(string text);
    }
}